Learn R Programming

pchc (version 0.4)

Plot of a Bayesian network: Plot of a Bayesian network

Description

Plot of a Bayesian network.

Usage

bnplot(dag, shape = "ellipse", main = NULL, sub = NULL)

Arguments

dag

A BN object, an object of class "bn".

shape

A character string defining the shape of the nodes, "ellipse" (default value), "circle" or "rectangle".

main

The main title of the graph displayed on the top.

sub

The subtitle of the graph displayed at the bottom.

Value

The Bayesian network is visualised.

Details

The function is called from the "bnlearn" package which invokes the "Rgraphviz" package from Bioconductor and you need to install it first.

See Also

pchc, pc.skel

Examples

Run this code
# NOT RUN {
# simulate a dataset with continuous data
x <- matrix( rnorm(200 * 10, 1, 10), nrow = 200 )
a <- pchc(x)
bnplot(a$dag)
# }

Run the code above in your browser using DataLab